/**
 * com.sunrise.commons.dao.Dialect.java
 */
package com.mbmed.doctor.commons.dao;



 /**
 * @file  Dialect.java
 * @author yangzhengxin(Jason)
 * @version 0.1
 * @todo 数据库方言基类
 * Copyright(C), 2013-2014
 *			Shenzhen Coordinates Software Development Co., Ltd
 * History
 *   	1. Date: 2013-4-18
 *      	Author: yangzhengxin(Jason)
 *      	Modification: this file was created
 *   	2. ...
 */
public abstract class Dialect {
    private static Dialect dal=null; 
	
    public abstract String getLimitString(String sql, int offset, int limit); 
    
    public static Dialect getDialect(String dalStr){
		if(dal==null&&"ORACLE".equals(dalStr)){
			dal=new OracleDialect();
		}else if("POSTGRESQL".equals(dalStr)){
			dal=new PostgresqlDialect();
		}else if("SQLSERVER".equals(dalStr)){
			dal=new SqlserverDialect();
		}
		return dal;
	}	
}
